STEP 2: We can take input from the user about the price of the item and the discount offered!

You've worked with strings and integers. Now, you'll work with floats! Floats are real numbers and written with a decimal point.

  • Click on . Drag Ask for Float into the bottom of your program.
  • Change the variable to price. Change the text in the question to, "What is the original price? (No $ signs)".


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)